<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        window.onload=function(){
            var canvas=document.getElementById('canvas');
            var cx=canvas.getContext('2d');
            cx.fillStyle='#0808ff';
            cx.beginPath();
            cx.arc(40,30,15,0,Math.PI*2);
            cx.closePath();
            cx.fill();

            var g=cx.createLinearGradient(0,0,0,0);
            g.addColorStop(0.5,'#2222e9');
            g.addColorStop(1,'#5d5db2');
            cx.fillStyle=g;
            cx.beginPath();
            cx.arc(90,60,28,0,Math.PI*2);
            cx.closePath();
            cx.fill();

            var g=cx.createLinearGradient(0,0,0,0);
            g.addColorStop(0.5,'red');
            g.addColorStop(1,'red');
            cx.fillStyle=g;
            cx.globalCompositeOperation="destination-over";
            cx.beginPath();
            cx.arc(120,90,34,0,Math.PI*2);
            cx.closePath();
            cx.fill();
        }
    </script>
</head>
<body>
    <canvas id="canvas" width="600px" height="600px" style="background-color: #eeeeff;"></canvas>
</body>
</html>